package cn.ito.zjgsu.utils.test;

import java.util.Map;

import cn.ito.zjgsu.constant.Mapping;

public class SQL {
	public static void main(String[] args) {
		//fillData("财务管理",Mapping.financeMap);
		//fillData("项目编制",Mapping.authorizeMap);
		//fillData("项目审定", Mapping.examineMap);
		//fillData("项目盖章", Mapping.sealMap);
		//fillData("项目归档", Mapping.archiveMap);
		//fillData("项目管理", Mapping.projectManageMap);
		//fillData("招投标管理", Mapping.bidMap);
	}

	private static void fillData(String modelName , Map<String,String> map) {
		String sql = "insert into view(model_name,number,fieldname,checked,`key`) values ";
		int i=0;
		for(Map.Entry<String, String> entry : map.entrySet()){
			i++;
			sql+="("+"'"+modelName+"',"+i+",'"+entry.getKey()+"',"+true+",'"+entry.getValue()+"'"+")";
			if(i!=map.entrySet().size()){
				sql+=",";
			}
		}
		System.out.println(sql);
	}
}
